package pactexample339

import feign.Headers
import feign.Param
import feign.RequestLine
import org.springframework.cloud.netflix.feign.FeignClient
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RequestMethod
import org.springframework.web.bind.annotation.RequestParam

@FeignClient(name = "PactExample")
interface PactExampleCli {
    @Headers("Accept: application/json;charset=UTF-8")
    @RequestLine("GET /sample?user={user}")
    @RequestMapping(method = RequestMethod.GET, path = "/sample?user={user}", produces = "application/json;charset=UTF-8")//, consumes = "application/json;charset=UTF-8"
    Map sample(
            @Param("user")//work for testing
            @RequestParam(name = "user", required = false)
                    String user
    )
}